package com.xinjie.www.dao.post;

import com.xinjie.www.po.Post;

import java.sql.Connection;
import java.sql.Date;
import java.sql.SQLException;
import java.util.List;

public interface PostDao {
    //写帖子
    public int writePost(Connection connection, String title, String tieba, String time, String content, String writer) throws SQLException;

    //查看自己发布的贴子
    public List<Post> getOwnPost(Connection connection, String writer) throws SQLException;

    //管理员查看管理贴吧下的帖子
    public List<Post> getAllPost(Connection connection, String managerName) throws SQLException;

    //删除帖子
    public int deletePost(Connection connection, int id, String tieba) throws SQLException;

    //获取贴吧下的所有帖子
    public List<Post> getPostList(Connection connection, String tieba) throws SQLException;

    //获取收藏、点赞的帖子
    public Post getPost(Connection connection, int postId) throws SQLException;
}
